import HttpUtils from '../../utils/http.utils';

const urls = {
		'captureDeviceList': globalConfig.apiPath.v1 + 'api/pmat/v1/captureDevice',
		'policeList':globalConfig.apiPath.v1 + 'api/auth/v1/users/list',
		'queryByCaptureId':globalConfig.apiPath.v1+'api/pmat/v1/captureDevice/queryByCaptureId/',
		'queryByPoliceId':globalConfig.apiPath.v1+'api/pmat/v1/captureDevice/queryByPoliceId/',
		'updatePermission':globalConfig.apiPath.v1+'api/pmat/v1/captureDevice'
};

let AlarmSrv = {

    captureDeviceList: function (params = {}) {//设备列表及查询
		return HttpUtils.post(urls.captureDeviceList,params);
	},
    queryByCaptureId: function (params = {} ) {
        console.log("queryByCaptureId:url:"+urls.queryByCaptureId+params.id)
        return HttpUtils.get(urls.queryByCaptureId+params.id);
    },
    policeList: function (params = {}) {//用户列表及查询
		return HttpUtils.post(urls.policeList,params);
	},
    queryByPoliceId: function (params = {} ) {
        console.log("queryByPoliceId:url:"+urls.queryByPoliceId+params.id)
        return HttpUtils.get(urls.queryByPoliceId+params.id);
    },
    updatePermission:function (params = {}) {
        console.log("updatePermission:url:"+urls.updatePermission)
		return 	HttpUtils.put(urls.updatePermission,params);
    }
};

export {AlarmSrv};
